<html>
<head>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
	<title>Jsswing FlowLayout Demo</title>
	<link rel="stylesheet" type="text/css" href="ext2/resources/css/ext-all.css" />
	<script type="text/javascript" src="ext2/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="ext2/ext-core-debug.js"></script>	
		
	<script type="text/javascript" src="js/jsswing.js"></script>
	<script>
	Ext.BLANK_IMAGE_URL = 'ext2/resources/images/default/s.gif';
	
	jsw.ROOT_DIR='.';
	
	Ext.onReady(
		function(){
			var doc=jsw.BrowserDocument.getInstance();

			var panel=new jsw.JPanel();
			panel.setForeground("#ffffff");
			panel.setBorder(new jsw.border.ShadowBorder());
			panel.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			doc.add(panel);
			
			var label1=new jsw.JLabel("Label A in a JPanel");
			panel.add(label1);
			var label2=new jsw.JLabel("Label B in a JPanel");			
			label2.setBorder(new jsw.border.LineBorder("black",2));
			panel.add(label2);
			
			var label3=new jsw.JLabel("Label C");
			label3.setBorder(new jsw.border.LineBorder("black",2));
			label3.setBackground("#00ffff");
			doc.add(label3);
			
			var label4=new jsw.JLabel("JLabel D");
			label4.setBorder(new jsw.border.ShadowBorder());
			label4.setPreferredSize({width:100,height:150});
			label4.setForeground("#ffffff");
			label4.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			doc.add(label4);
			
			
			var label5=new jsw.JLabel("(We are all in FlowLayout,");
			label5.setForeground("#ffffff");
			doc.add(label5);
			
			var label6=new jsw.JLabel("resize the browser window, you would see it auto layouts)");
			label6.setForeground("#ffffff");
			doc.add(label6);
			
			var doc=jsw.BrowserDocument.getInstance();
			doc.setLayout(new jsw.FlowLayout());
			
			doc.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/wallpaper.jpg");			
			doc.setVisible(true);//set everything visible
			
		});
	</script>
</head>
</html>
